<?php
namespace app\api\controller;
use app\BaseController;
use app\common\model\PageModel;

class Page extends BaseController{
    public function detail(){
        $page_id = $this->request->param('page_id/d',0);
        if(empty($page_id)){
            return error('错误操作');
        }
        if(null === $PageModel = PageModel::field('page_name,page,menu,menu_type')->find($page_id)){
            return error('内容不存在');
        }
        return success($PageModel);
    }
}